//
//  YNMessagerManager.h
//  Messenger
//
//  Created by iOS on 15/2/6.
//  Copyright (c) 2015年 孙浪. All rights reserved.
//
//  消息接收分组
//

#import "XMPPModule.h"
#import "YNXMPPprotocol.h"
#import "YNIMFrameworkTypedef.h"
@class YNMessage;
@class XMPPIQ;
@interface YNMessagerManager : XMPPModule

-(instancetype)initWithDelegate:(id<YNXMPPprotocol>)delegate;
//发送消息
- (void)sendMessage:(YNMessage *)aMassage;

/**HX** 发送消息回执 **/
- (void)sendReceiptMessage:(YNMessage*)aMessage type:(ReceiptMessageType)messageType;

/**HX** 发送广播消息 **/
-(void)sendBroadcastMessage:(NSArray<NSString*>*)reciveUserIds body:(NSString*)body;
@end

#pragma mark - MessageDelegate
@protocol YNMessageReceiceDelegate
@optional

//接受到两人消息
- (void)receiveMessageFromUser:(YNMessage *)message messageControType:(YNBubbleMessageType)controType;

//接受到群组消息
- (void)receiveGroupMessage:(YNMessage *)message messageControType:(YNBubbleMessageType)controType;

//接受到广播消息
- (void)receiveBroadcastMessage:(YNMessage *)message;

//接受到系统通知消息
- (void)receiveSystemNotificationMessage:(YNMessage *)message;

//消息回执，信息发送成功，通知数据库保存数据
- (void)receiveReceiptStateWithIQ:(XMPPIQ *)iq aMesssage:(YNMessage *)message;

- (void)updateSoundPlayTime;

@end
